Skip to content

Missing calls to updateMetadata#1442

Merged
Janther merged 1 commit intomainfrom
missing-update-metadata
Mar 8, 2026
Merged

Missing calls to updateMetadata#1442
Janther merged 1 commit intomainfrom
missing-update-metadata

Conversation

@Janther
Copy link
Copy Markdown
Member

@Janther Janther commented Mar 5, 2026

I found out these 3 nodes were missing a call to updateMetadata in their constructor. This might slightly change the place where comments are placed.

there are 2 cases when a node doesn't need a call.

  • when it only has children that are TerminalNode or plain strings.
  • when it's an array of items.

AbicoderPragma used to be the first kind but was updated with NomicFoundation/[email protected] and I missed to add the call. (0bbea0a) this is a very simple node and very unlikely to trigger an unexpected format with an ill placed comment but I'd like to keep things consistent.

ArrayExpression and TupleExpression had a node called items which I didn't notice was not an array, when I cleaned up the call to updateMetadata since it was not needed for arrays anymore. (5ac8158)

@Janther Janther requested a review from fvictorio March 5, 2026 12:55
@Janther Janther added the bug Something isn't working label Mar 5, 2026
@Janther Janther force-pushed the missing-update-metadata branch from a3de733 to 0a6326c Compare March 6, 2026 15:07
@Janther Janther added format Addresses a change in the format and removed bug Something isn't working labels Mar 6, 2026
@Janther Janther force-pushed the missing-update-metadata branch from 0a6326c to 182bd56 Compare March 7, 2026 21:03
@Janther Janther merged commit f37c450 into main Mar 8, 2026
7 checks passed
@Janther Janther deleted the missing-update-metadata branch March 8, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

format Addresses a change in the format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants